<h2>Basic TagBox</h2>
<p>The TagBox is created from a simple input element.</p>
<div style="margin: 20px 0;"></div>

<div class="easyui-panel"
	style="width: 100%; max-width: 400px; padding: 30px 60px;">
	<input id="tbox" class="easyui-tagbox" label="部门选择"
		style="width: 100%" data-options="
				url: 'api/getdept',
				method: 'get',
				valueField: 'id',
				textField: 'text',
				limitToList: true,
				hasDownArrow: true,
				prompt: '选择部门'
				">
		<a id="btn" href="#" class="easyui-linkbutton" >提交</a>
</div>
<script>
$(function(){
    $('#btn').bind('click', function(){
        alert($("#tbox").tagbox("getValues"));
    });
});
</script>